package com.cwj.film.configuration;


import com.cwj.film.fieter.cross_domain_filter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyBeans {
        @Bean
        public FilterRegistrationBean<cross_domain_filter> cross_domain_filter(){
            cross_domain_filter filter = new cross_domain_filter();
            FilterRegistrationBean<cross_domain_filter> bean = new FilterRegistrationBean<>(filter);
            bean.addUrlPatterns("/*");
            return bean;
        }

       }
